package java_thinking.unit_19._19_1_6;

/**
 * @Desc:
 * @author: cww
 * @DateTime: 2019/5/22 9:06
 */

public enum SpaceShip {
    SCOUT("a"), CARGO("b"), TRANSPORT("c"), CRUISER("d"), BATTLESHIP("e"), MOTHERSHIP("f");

    private String s;
    SpaceShip(String s) {
        this.s = s;
    }

    public String getS() {
        return s;
    }

    @Override
    public String toString() {
        String id = name();
        String des = getS();
        String lower = id.substring(1).toLowerCase();
        return id.charAt(0) + lower + " des " + des;
    }

    public static void main(String[] args) {
        for (SpaceShip spaceShip : values()) {
            System.out.println(spaceShip);
        }
    }
}
